package com.nes.redismq.springboot.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Service;

/**
 * Created by wdq on 17-3-14.
 */
public class OneMessageListener extends MessageListenerAdapter {

    @Override
    public void onMessage(Message message, byte[] pattern) {
        handleMessage(message.toString());
    }

    public void handleMessage(String xx){
        System.out.println("xxx--------->"+xx);
    }

}

